import request from '/@/utils/request';

/**
 * oss
 */
export function ossApi() {
	return {
		
		list: (params?: object)=> {
			return request({
				url: import.meta.env.VITE_APP_BASE_API+'/system/oss/list',
				method: 'post',
				params
			});
		},
		edit: (params?: object)=> {
			return request({
				url: import.meta.env.VITE_APP_BASE_API+'/system/oss',
				method: 'put',
				data: params
			});
		},
		query: (id?: number | string)=> {
			return request({
				url: import.meta.env.VITE_APP_BASE_API+'/system/oss/'+id,
				method: 'get'
			});
		},
		insert: (params?: object) => {
			return request({
				url: import.meta.env.VITE_APP_BASE_API+'/system/oss',
				method: 'post',
				data: params
			});
		},
		delete: (id?: number | string) => {
			return request({
				url: import.meta.env.VITE_APP_BASE_API+'/system/oss/' + id,
				method: 'delete'
			});
		},
	};
}
